home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / pop < prev    next >
Text File  |  2001-03-21  |  1KB  |  32 lines

  1. Synopsis:
  2.    $pop(<variable name>)
  3.    $push(<variable name> <data>)
  4.  
  5. Technical:
  6.    These functions are used to add or remove a word from the end of a
  7.    variable.  They are analogous to the commands of the same names; $pop()
  8.    removes the last word from the variable and returns it, while $push()
  9.    adds the given word to the end of the variable and returns the resulting
  10.    contents of the variable.
  11.  
  12. Practical:
  13.    These functions are probably the most efficient for adding data to or
  14.    removing data from the end of a variable.  It works in the variable name
  15.    directly, so no expansion is involved (meaning you do not give the
  16.    variable in the $var notation, just the name alone).
  17.  
  18.    If the variable to push to does not exist, it is created.  The variable
  19.    is deleted if the only word in it is popped off.
  20.  
  21. Returns:
  22.    pop:  word removed
  23.    push: variable contents after push
  24.  
  25. Examples:
  26.    $push(blah hello there)            adds "hello there" to end of $blah
  27.    $pop(blah)                         removes "there" from $blah
  28.  
  29. See Also:
  30.    pop(5); push(5); shift(6); unshift(6)
  31.  
  32.